<section class="card manual">
    <div class="card-header">
            <filter-list request="request" callback="getList(pageIndex)"></filter-list>
            <select class="btn custom-select custom-select-sm col-3" ng-model="type" ng-change="getListByType(pageIndex)">
                    <option value="-1">All</option>
                    <option ng-repeat="type in settings.moduleTypes track by $index" ng-value="$index">{{type}}</option>
                </select>
             
            <select class="btn custom-select custom-select-sm col-3" ng-model="selectedList.action">
                    <option ng-repeat="item in actions" ng-value="item">{{item}}</option>
                </select>
                <a class="btn btn-primary text-white" ng-if="selectedList.data.length > 0 && selectedList.action" ng-click="applyList()">Apply</a>
             
    </div>
    <div class="card-body">
            <table class="table table-sm table-hover" cellspacing="0">
                    <thead class="thead-light">
                        <tr>
                            <th scope="col" width="3%">
                                <span class="oi oi-sort-ascending"></span>
                            </th>
                            <th scope="col" style="width: 4%;">
                                <input type="checkbox" ng-model="isSelectAll" ng-change="selectAll(isSelectAll)">
                            </th>
                            <th scope="col" width="5%">
                                Priority
                            </th>
                            <th scope="col" width="35%">
                                Title
                            </th>
                            <th scope="col" width="10%">
                            </th><th scope="col" width="35%">
                                Name
                            </th>
                            <th scope="col" width="10%">
                                Created Date
                            </th>
                            
                            <th scope="col" width="5%">
                                Image
                            </th>
                            <th scope="col" style="width: 5%;">Actions</th>
                        </tr>
                    </thead>
            
                    <tbody class="sortable" ng-init="getList()">
                        <tr ng-repeat="item in data.items track by $index" class="sortable-item" sort-model="module" sort-model-id="{{item.id}}">
                            <td style="cursor:move;" class="drag-header">
                                <span class="fas fa-sort"></span>
                            </td>
                            <td>
                                <input type="checkbox" ng-model="item.isSelected" ng-change="select(item.id, item.isSelected)">
                            </td>
                            <td>
                                {{item.priority}}
                            </td>
                            <td>
                                {{item.title}}
                            </td>
                            <td>
                            </td><td>
                                {{item.name}}
                            </td>
                            <td>
                                <small>
                                    {{item.lastModified | utcToLocal:'d.M.yyyy h:mm a'}}
                                </small>
                            </td>
                            <td>
                                <preview-image img-height="25" img-src="item.image"></preview-image>
                            </td>
                            <td>
                                <div class="btn-group btn-group-sm btn-group-sm float-right" role="group" aria-label="Actions">
                                    <a href="/portal/module/details/{{item.id}}" class="btn btn-light">
                                        <span class="fa fa-pen text-primary"></span>
                                    </a>
                                    <!--<a href="{{item.detailsUrl}}" target="_blank" class="btn btn-light">
                                        <span class="fa fa-eye text-primary"></span>
                                    </a>-->
                                    <a ng-if="item.type==2" href="/portal/module-article/list/{{item.id}}" class="btn btn-light">
                                        <span class="fas fa-list text-info"></span>
                                    </a>                                
                                    <a ng-if="item.type==1" href="/portal/module/data/{{item.id}}" class="btn btn-light">
                                        <span class="fas fa-list text-info"></span>
                                    </a>                                
                                    <a ng-click="remove(item.id);" class="btn btn-light">
                                        <span class="fas fa-times text-danger"></span>
                                    </a>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
    </div>
    <div class="card-footer">
            <paging class="small" page="data.page" page-size="data.pageSize" total="data.totalItems" ul-class="pagination justify-content-end" a-class="page-link" paging-action="getList(page-1)" scroll-top="true">
    </paging></div>  
</section>
